3.51 \(\int \cosh ^2(c+d x) (a+b \text {sech}^2(c+d x)) \, dx\)

Optimal. Leaf size=31 \[ \frac {1}{2} x (a+2 b)+\frac {a \sinh (c+d x) \cosh (c+d x)}{2 d} \]

[Out]

1/2*(a+2*b)*x+1/2*a*cosh(d*x+c)*sinh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4045, 8} \[ \frac {1}{2} x (a+2 b)+\frac {a \sinh (c+d x) \cosh (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

((a + 2*b)*x)/2 + (a*Cosh[c + d*x]*Sinh[c + d*x])/(2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 4045

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rubi steps

\begin {align*} \int \cosh ^2(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx &=\frac {a \cosh (c+d x) \sinh (c+d x)}{2 d}+\frac {1}{2} (a+2 b) \int 1 \, dx\\ &=\frac {1}{2} (a+2 b) x+\frac {a \cosh (c+d x) \sinh (c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 33, normalized size = 1.06 \[ \frac {a (c+d x)}{2 d}+\frac {a \sinh (2 (c+d x))}{4 d}+b x \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

b*x + (a*(c + d*x))/(2*d) + (a*Sinh[2*(c + d*x)])/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 28, normalized size = 0.90 \[ \frac {{\left (a + 2 \, b\right )} d x + a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*((a + 2*b)*d*x + a*cosh(d*x + c)*sinh(d*x + c))/d

________________________________________________________________________________________

giac [B]  time = 0.15, size = 66, normalized size = 2.13 \[ \frac {4 \, {\left (d x + c\right )} {\left (a + 2 \, b\right )} + a e^{\left (2 \, d x + 2 \, c\right )} - {\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

1/8*(4*(d*x + c)*(a + 2*b) + a*e^(2*d*x + 2*c) - (2*a*e^(2*d*x + 2*c) + 4*b*e^(2*d*x + 2*c) + a)*e^(-2*d*x - 2
*c))/d

________________________________________________________________________________________

maple [A]  time = 0.31, size = 37, normalized size = 1.19 \[ \frac {a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\left (d x +c \right ) b}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x)

[Out]

1/d*(a*(1/2*cosh(d*x+c)*sinh(d*x+c)+1/2*d*x+1/2*c)+(d*x+c)*b)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 38, normalized size = 1.23 \[ \frac {1}{8} \, a {\left (4 \, x + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} + b x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

1/8*a*(4*x + e^(2*d*x + 2*c)/d - e^(-2*d*x - 2*c)/d) + b*x

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 23, normalized size = 0.74 \[ \frac {a\,x}{2}+b\,x+\frac {a\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(c + d*x)^2*(a + b/cosh(c + d*x)^2),x)

[Out]

(a*x)/2 + b*x + (a*sinh(2*c + 2*d*x))/(4*d)

________________________________________________________________________________________

sympy [A]  time = 11.24, size = 60, normalized size = 1.94 \[ a \left (\begin {cases} - \frac {x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac {x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {\sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \cosh ^{2}{\relax (c )} & \text {otherwise} \end {cases}\right ) + b \left (\begin {cases} x & \text {for}\: \left |{x}\right | < 1 \\{G_{2, 2}^{1, 1}\left (\begin {matrix} 1 & 2 \\1 & 0 \end {matrix} \middle | {x} \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 2, 1 & \\ & 1, 0 \end {matrix} \middle | {x} \right )} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)**2*(a+b*sech(d*x+c)**2),x)

[Out]

a*Piecewise((-x*sinh(c + d*x)**2/2 + x*cosh(c + d*x)**2/2 + sinh(c + d*x)*cosh(c + d*x)/(2*d), Ne(d, 0)), (x*c
osh(c)**2, True)) + b*Piecewise((x, Abs(x) < 1), (meijerg(((1,), (2,)), ((1,), (0,)), x) + meijerg(((2, 1), ()
), ((), (1, 0)), x), True))

________________________________________________________________________________________